public class Main {
    public static void main(String[] args) {
        int[][] array4=new int[2][];
        array4[0] =new int[]{1,2,3,4};
        array4[1] =new int[]{5,6,7};
        for (int i = 0; i < array4.length; i++) {
            for (int j = 0; j < array4[i].length; j++) {
                System.out.print(array4[i][j]+" ");
            }
        }
    }
    public static void main3(String[] args) {
        int[][] array3 = new int[2][];
        for (int i = 0; i < array3.length; i++) {
            for (int j = 0; j < array3[i].length; j++) {
                System.out.println(array3[i][j]);
            }
        }
    }
    public static void main2(String[] args) {
        int[][] array2={{1,2,3},{4,5,6}};
        System.out.println(array2.length);//确定行数
        System.out.println(array2[0].length);//确定列数
    }
    public static void main1(String[] args) {
        int[][] array1={{1,2,3},{4,5,6}};
        for(int i=0;i< array1.length;i++){
            for(int j=0;j<array1[i].length;j++){
                System.out.print(array1[i][j]+" ");
            }
        }
    }
}
